Data sources can provide event streams to clients for further exploitation. For example, an event stream can include events corresponding to stock prices that are communicated via the event stream at arbitrary times, such as upon a change in price of a stock. Event streams and associated events are typically harnessed as data over which queries can be executed. Querying enables resources (e.g., software, servers, applications, hardware . . . ) to utilize the event streams and events. For instance, a particular stock price can be monitored and a user notified when the price reaches a certain value.
Conventional event streams comprise reactive streams of point events that occur at a specific point in time. It can be useful to include duration for each of the events to facilitate exploiting event streams and respective data. Typically, two techniques are employed to handle representing duration for events from event streams-utilizing an end-of-duration event or implementing a time stamp.
An end of duration event can be generated for each event on an event stream. Yet, such end of duration events are not directly correlated to corresponding events. In particular, the event stream of events can include a corresponding stream that includes end of duration events for each event on the event stream. However, complications can develop as mapping is required between the event stream and the end-of-event corresponding stream in order to associate an event with a respective end of duration event. Mapping and encoding this relationship between the event stream and the end of duration events can be complex and inefficient.
A time stamp typically includes a variable in the time domain that is associated with the event in which the variable represents duration. Duration represented by a variable in the time domain requires the entire duration to be defined with a start and an end for accurate representation of the duration for each event. This can lead to delay in aggregation of events since an event end must be identified while using a time stamp. For instance, suppose an event is issued whenever a person was born that has a duration until the person dies. It is beneficial to issue the event as soon as possible but the date of death is not known until much later. This forces a delay since the birth event will not issue until death occurs so that the duration is certain.
Moreover, difficulty arises in representing infinite events. The time stamp technique, as mentioned, requires the duration (e.g., a start and an end) in order to represent an event. In order to overcome the challenges with infinite duration events, time stamp techniques can provide an estimated duration (e.g., start and end for events) and, at a later time, updating the estimates. Yet, this leads to excess processing, increased delays, and inaccurate duration representation for events between updates.